home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / e-lang / realgaug.lha / Gauge.Doc < prev    next >
Text File  |  1980-01-01  |  10KB  |  228 lines

  1.  
  2.     --------------------------------------------------------------------
  3.  
  4.     `Gauge plugin`-module                                           V1.1
  5.                     (w) 1996 by by Daniel `ThunderPig` Raedel/NEUDELSoft
  6.  
  7.     --------------------------------------------------------------------
  8.     |   I apologize for any grammatical and/or orthographical errors   |
  9.     --------------------------------------------------------------------
  10.  
  11.     This stuff is em@ilware - send me a mail and I will send you the
  12.     newest version of this module (if there is any ;) - perhaps with
  13.     your ideas implemented?
  14.  
  15.     It is not allowed to spread this archive in a commercial way without
  16.     asking for my permission!!!!
  17.  
  18.     I will take *NO* responsibility for anything that might (or might
  19.     not) happen while using this module... okay: if there should come
  20.     a really pretty (and not too dumb :) girl along your way right after
  21.     playing around with this module: send her to me - I lost her in the
  22.     source code ;-))
  23.  
  24.     --------------------------------------------------------------------
  25.  
  26.     Using this plugin in conjunction with the `easygui` module by Wouter,
  27.     you are able to use gauge bars of every kind (well, there are three
  28.     different ones - each with a lot of features: horizontal and vertical
  29.     bars, horiz. and vert. `volume-slider`-like things and... round
  30.     `speed-o-meter`-like ones!!). You are even able to use them as
  31.     replace for the boring slider bar as they can interact with your
  32.     PROCs like all other easygui implementations. Take a look at Gauge_Test
  33.     to see what I mean...
  34.  
  35.     Of course you may use this module without easygui, too  - but then
  36.     *you* have to look for the right coordinates :)
  37.  
  38.     It should be obvious that you need at least V37 to use this module...
  39.  
  40.     --------------------------------------------------------------------
  41.  
  42.     If you find any bugs or have some ideas in order to improve the module
  43.     - write me!
  44.  
  45.             em@il:     p5dara@dagobert.rz.uni-jena.de
  46.                        thunder@mipool.rz.uni-jena.de
  47.  
  48.             snail mail:
  49.                                Daniel Raedel
  50.             Fuchsloecherstr. 28             Margaretenstr. 52/2
  51.             07749 Jena                      88045 Friedrichshafen
  52.             (during term time               (Mom's ad :)
  53.             - and most of the
  54.             rest time, too)
  55.  
  56.     --------------------------------------------------------------------
  57.  
  58.     Things I will optimize when I'm not busy:
  59.  
  60.             *   implement possibility to place some extra text
  61.                 around gfx (does someone really want this?)
  62.  
  63.             *   speed up the routine that paints the `round`-type
  64.                 bars... (I know how, I still have not the time
  65.                 to f*#% around with guru meditations while
  66.                 accessing the bitplanes directly :(
  67.  
  68.     --------------------------------------------------------------------
  69.  
  70.     PROCs in the module:
  71.  
  72.         NEW gauge_bar.init_gauge([taglist]):
  73.             This is the routine to initialize your plugin. Don't forget
  74.             to END gauge_bar when you've finished!
  75.             The tags are described later.
  76.  
  77.         set_text:=gauge_bar.settext(window,text):
  78.             Change the text after you have created the plugin
  79.             (...but you can't change the TextLen anymore!)
  80.  
  81.         set_num:=gauge_bar.setgauge(window,num):
  82.             Change the current `fill status` of the plugin. The
  83.             module will itself look that you don't break the
  84.             boundaries (min and max value).
  85.  
  86.         -< Using the other routines is not recommended >-
  87.     --------------------------------------------------------------------
  88.  
  89.     The tags this plugin understands:
  90.     ---------------------------------
  91.  
  92.       GA_Screen (APTR): a pointer to the screen the gui will be
  93.                     opened on. If omitted, the module will get
  94.                     its informations (VisualInfo and DrawInfo)
  95.                     from the default public screen. Use this if you
  96.                     intend to open the gui on an other than the
  97.                     DefaultPubScreen (e.g. Workbench).
  98.                     DEFAULT: NIL (= default pub screen)
  99.     -< new in V1.1 - something really important I forgot in V1.0 :-( >-
  100.  
  101.       GA_Min (INT): The minimum value to display; DEFAULT: 0
  102.  
  103.       GA_Max (INT): the maximum value; DEFAULT: 100
  104.  
  105.       GA_Current (INT): the value the plugin shall display
  106.                     when initialized; DEFAULT: 0
  107.  
  108.       GA_BorderRecessed (BOOL): If you want a recessed border around
  109.                     the normal gauge bars ; DEFAULT: FALSE
  110.  
  111.       GA_BarPen (CHAR) : colour number to use for the bar in the
  112.                     normal gauge bars
  113.                     DEFAULT: DrawInfo.Pens[FillPen]
  114.  
  115.       GA_backgroundPen (CHAR): colour number that is to be used to
  116.                     fill the `empty` field in the gauge bar and to
  117.                     fill the knob of the volume slider
  118.  
  119.       GA_TextPtr (APTR): Ptr to a string or Array of Chars; this text
  120.                     will be used when displaying information inside (or
  121.                     around) the plugin. Will be ignored until GA_TextLen
  122.                     is greater than 0. DEFAULT: 'ThunderPig' ;-)
  123.  
  124.       GA_TextLen (CHAR): The length of the text GA_TextPtr points to.
  125.                     This can't be modified later!
  126.                     DEFAULT: 0 (=> no text)
  127.  
  128.       GA_TextPen (CHAR): Farbe für Text; DEFAULT:
  129.                     DrawInfo.Pens[TextPen]
  130.  
  131.       GA_Percentage (BOOL): Use this if you want the plugin to
  132.                     automatically write the actual value of the
  133.                     plugin in percent in (or around) the plugin.
  134.                     Activating this tag means that GA_TextPtr and
  135.                     GA_TextLen will be ignored!
  136.                     DEFAULT: FALSE
  137.  
  138.       GA_IsVertical (BOOL): Turn the gauge bar or the volume
  139.                     slider by 90 degrees. The plugin will
  140.                     be `filled` from bottom to top.
  141.                     DEFAULT: FALSE
  142.  
  143.       GA_FixedWidth (INT),
  144.       GA_FixedHeight (INT): If you want the plugin to have a fixed
  145.                     width/height. The module will adjust this value if
  146.                     you set it to a number that is smaller than
  147.                     the minimum width/height required.
  148.                     DEFAULT: 0 (=> no fixed width/height)
  149.  
  150.       GA_Bar3D (BOOL): The bar in the normal gauge bar will be
  151.                     drawed with a 3-dimensional border around.
  152.                     DEFAULT: FALSE
  153.  
  154.       GA_BarRecessed (BOOL): When using GA_Bar3D, you may use this
  155.                     tag to draw the recessed version of the border
  156.                     around the bar. DEFAULT: FALSE
  157.  
  158.       GA_IsRound (BOOL): Draw the plugin as some kind of speed-o-meter;
  159.                     This plugin will resize in x- *and-* y-direction if
  160.                     no fixed width is specified (fixed height will be
  161.                     ignored). Also, all `normal gauge bar`-specific
  162.                     tags (bar3D, BorderRecessed, ...) will be ignored.
  163.                     Text will be written inside the gfx.
  164.                     DEFAULT: FALSE
  165.  
  166.       GA_RoundPointerPen (CHAR): the colour number that shall be used
  167.                     for the pointer inside the `speed-o-meter`-like
  168.                     plugin. DEFAULT: Drawinfo.pens[SHINEPEN]
  169.  
  170.       GA_IsVolumeSlider (BOOL): If you want the plugin to look like
  171.                     a `volume slider`. GA_IsRound and the special bar tags
  172.                     will be ignored (but you may use GA_IsVertical).
  173.                     Text will be placed to the left/right of the slider
  174.                     (over/under the slider if it's a vertical one).
  175.                     DEFAULT: FALSE
  176.  
  177.       GA_RightText (BOOL): To display the text to the right of the
  178.                     volume slider (under it if GA_IsVertical is set).
  179.                     DEFAULT: FALSE
  180.  
  181.       GA_GaugeUsable (BOOL): This enables the possibility to use the
  182.                     plugin to directly change values, not only to
  183.                     display them. Should be used with GA_ActionProc as
  184.                     it makes no sense alone.
  185.                     Using this tag, you convert every one of those
  186.                     plugins into real sliders!
  187.                     -<see Gauge_Test.e! >-
  188.  
  189.       GA_ActionProc (APTR): A ptr to a procedure (-> {myproc} ) that will
  190.                     be called every time the value of the plugin changes
  191.                     (if GA_GaugeUsable=TRUE).
  192.                     This procedure must have *two* parameters: gauge_id and
  193.                     current_value. So your proc should look the following:
  194.  
  195.                     PROC myproc(id, val)
  196.                         ...
  197.                     ENDPROC
  198.                     -<see Gauge_Test.e! >-
  199.  
  200.  
  201.       GA_GaugeID (CHAR): An identification number the plugin will use
  202.                     when it calls your `ActionProc`. Using different IDs
  203.                     for different plugins (recommended...:-), you may
  204.                     pass the same procedure to every plugin. The procedure
  205.                     will then be able to select certain actions for every
  206.                     one of the calling plugins.
  207.                     -<see Gauge_Test.e! >-
  208.  
  209.     --------------------------------------------------------------------
  210.  
  211.     If you have any questions: my ad can be found above...
  212.  
  213.     --------------------------------------------------------------------
  214.  
  215.     History:
  216.  
  217.         V1.0    Very first (and released) Version, written between
  218.                 26-April-96 and 04-May-96
  219.  
  220.         V1.1    Blame on me! I forgot one of the most important tags!
  221.                 Now included `GA_Screen` (select the screen from where
  222.                 the plugin has to obtain VisulaInfo and DrawInfo in
  223.                 order to draw the gfx in the way the user/coder defined
  224.                 it).
  225.                 Fixed 06-May-96
  226.  
  227.                                                                     EOF.
  228.